/*
 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package java.util;

/**
 *
 * 双向遍历
 *
 * @author chuming
 * @create 2021/12/29 - 21:57
 *
 */
public interface ListIterator<E> extends Iterator<E> {
    // Query Operations

    boolean hasNext();

    E next();

    boolean hasPrevious();

    E previous();

    int nextIndex();

    int previousIndex();



    // Modification Operations

    void remove();


    // 从列表中将next()或previous()返回的元素更改为指定元素e
    void set(E e);


    // 将指定的元素插入列表，插入位置为迭代器当前位置之前
    void add(E e);
}
